Data storage devices are commonly used to store data in computers, data bases, digital video recorders, and other devices. Data storage devices may include disk drives, solid state drives, and hybrid drives including both a disk and solid state memory. Different types of errors may occur during operation of a data storage device. For example, in a disk drive, a head used to write data on a disk may be pushed off track (e.g., due to vibration), which can result in data loss if the error is not detected and properly handled. Therefore, it is desirable to detect errors in a data storage device and to handle the detected errors appropriately.